﻿using System;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using System.Collections.Generic;
using System.Collections.ObjectModel;

namespace SilverlightApplication1
{
  public partial class Control2 : XapExplorerApplicationBase
	{


		public Control2()
		{
			// Required to initialize variables
			InitializeComponent();

      this.Storyboard1.Begin();
		}




    private void control2_GotFocus(object sender, RoutedEventArgs e)
    {

      if(isCommInitialized)
        this.tblk.Text = (string)environment["testVal"];

    }





    private void control2_sizeChanged(Object sender, SizeChangedEventArgs e)
    {
      //this.tblk.Text = "control2_sizeChanged";
      this.tblk.Text = "control2_sizeChanged" + this.Resources.Contains("uhul_eAgri_Commands").ToString();
    }






    protected override void onCommand(Command c)
    {

      this.tblk.Text = c.ToJson();

    }



	}
}